const { createClient } = require("redis");
const redisClient = createClient({
    url: 'redis://:123456@127.0.0.1:6379'
});
redisClient.on('ready', () => {
    console.log('redis链接成功')
})

redisClient.on('error', err => {
    console.log("err", err)
})
redisClient.connect()  
